<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var array1 = new Array(7);
        console.log(array1.length);
        var array2 = new Array(100,'abc',true);
        console.log(array2.length);
        //创建一个空数组
        var array =new Array();
        console.log(array.length);
        array[0] = '123';
        console.log(array);
        console.log(array.length)
        array[1] = false;
        console.log(array);
        console.log(array.length);

        //对JS里面的数组不可以使用下标，使用push和pop向数组里面放数据和拿数据
        var arr = new Array();
        arr.push('zhangsan');
        console.log(arr);
        console.log(arr.length);
        arr.push(false);
        console.log(arr);
        console.log(arr.length);
        arr.push(45);
        console.log(arr);
        console.log(arr.length);

        console.log(arr.pop());
        console.log(arr.pop());
        console.log(arr.pop());


    </script>
</head>
<body>

</body>
</html>